package dao

import (
	"yk/global"
	"yk/internal/model"
)

func GetUserBy(mobile string) model.User {
	var user model.User
	if err := global.DB.Where("mobile =?", mobile).Find(&user).Error; err != nil {
		return model.User{}
	}
	return user
}
